#include "dominion.h"
#include "rngs.h"
#include "dominion_helpers.h"
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <assert.h>

int main (int argc, char **argv)
{
	//create new gameState, with 2 players 
	//set turn to player 0, set handcount to 5, set discard to 0
	//playing smithy should increase handcount by 3
	//increase discard by 1
	int player = 0;
	struct gameState *test = newGame();
	test->numPlayers = 2;
	test->whoseTurn = 0;
	test->handCount[player] = 5;
	test->deckCount[player] = 10;
	test->discardCount[player] = 0;
	int *bonus = 0;
	test->hand[player][1] = smithy;
	test->whoseTurn = player;
	

	cardEffect(smithy, 0, 0, 0,test,1, bonus );
	
	if(test->handCount[player] == 7)
		{
			printf("Test passed.\n");
		}
	else
		printf("Test failed: %d\n", test->handCount[player]);
		
	if(test->playedCardCount == 1)
		{
			printf("Test passed.\n");
		}
	else
		printf("Test failed: %d\n", test->playedCardCount);
		
	//test if smithy will add cards to maxed out hand
	
	test->handCount[player] = 500;
	cardEffect(smithy, 0, 0, 0,test,1, bonus );
	if(test->handCount[player] == 502)
		{
			printf("Added cards to a maxed out hand. Card count is over 500: %d\n", test->handCount[player]);
		}
	else
		printf("Test passed: %d\n", test->handCount[player]);
	
	
	
	return 0;

}